package com.netflix.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ytj
 * @date 2021/12/16
 */
@RestController
public class ProviderController {
    private Logger logger= LoggerFactory.getLogger(ProviderController.class);

    @Value("${server.port}")
    private String port;

    @GetMapping("/test")
    public String test(String name) throws Exception{
        Thread.sleep(100L);
        logger.info("test方法被调用");
        return port+"-provider:"+name;
    }
}
